package com.hqq;

import com.hqq.pack1.SomeService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test1 {

    @Test
    public void test(){
        String config = "applicationContext.xml";
        ApplicationContext ac = new ClassPathXmlApplicationContext(config);
        //从容器中获得目标对象的代理
        SomeService proxy =(SomeService) ac.getBean("someService");
        //通过代理对象执行方法 实现功能增强
        proxy.doSome("hQQ",18);
    }
}
